<!DOCTYPE html>
<html>

<head>
    <title>预防针后台管理</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <style>

    </style>
</head>

<!-- 导航栏 -->
<nav class="navbar navbar-expand-md bg-dark navbar-dark fixed-top">
    <a class="navbar-brand" href="#">儿童预防针预约系统管理平台</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="collapsibleNavbar">
        <ul class="navbar-nav">
            <!-- <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>     -->
        </ul>
    </div>
</nav>
<br>
<!-- 导航栏end -->
<!-- 内容 -->
<div class="container-fluid" style="height: 80vh;margin-top: 60px;">
    <div class="row">
        <div class="col-md-2">
            <div class="list-group aa " style="overflow:auto;">
                <a href="{:url('home/index')}" class="list-group-item list-group-item-action">疫苗管理</a>
                <a href="{:url('hos/index')}" class="list-group-item list-group-item-action">卫生院管理</a>
                <a href="{:url('appointment/index')}" class="list-group-item list-group-item-action">预约单管理</a>
                <a href="{:url('user/index')}" class="list-group-item list-group-item-action">用户管理</a>
              </div>
              <a href="{:url('index/logout')}" class="btn btn-danger" style="width: 100%;margin-top: 20px;" role="button">注销</a>
        </div>
        <div class="col-md-10">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="index.html">首页</a></li>
                <li class="breadcrumb-item active">添加管理员</li>
            </ol>
            <div class="card">
                <div class="card-body">
                    <form action="{:url('hos/addhosadmin1')}" method="POST" onsubmit="return check()">
                        <input type=hidden name="hospital_id" value={$data.hospital_id}>
                        <div class="form-group">
                            <label for="usr">手机号:</label>
                            <input type="number" class="form-control" name="hos_phone" id="phone" required>
                        </div>
                        <div class="form-group">
                            <label for="usr">姓名:</label>
                            <input type="text" class="form-control" id="usr" name="hos_name" required>
                        </div>
                        <div class="form-group">
                            <label for="usr">*密码默认为【123456】</label>
                        </div>
                        <button type="submit" class="btn btn-primary">添加</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 内容end -->


<!-- 底部  -->
<div class="jumbotron text-center" style="margin-bottom:0">
    <p>@2020-tch</p>
</div>

<!-- 底部end  -->
</body>
<script>
    function check(){
        var phone = document.getElementById('phone').value;
        if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))){ 
            alert("手机号码有误，请重填");  
            return false; 
        } 
    }
    </script>
</html>